#pragma once
#include "util/noncopyable.h"
#include "base/config.h"
namespace net_tools::base
{

  class Timer : util::noncopyable
  {
  public:
    Timer();
    ~Timer();
    void Settime(timeval value); //interval = 0 over-time only once
    inline int Gettimefd() const { return timefd_; };

  private:
    int timefd_;
    struct timespec interval_;
  };

} // namespace net_tools::base